home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / June 96 / Re Using a gxViewPort < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  1.5 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Using a gxViewPort
  2. Sent:        6/14/96 1:53 PM
  3. Received:    6/14/96 2:01 PM
  4. From:        Henri Lamiraux, lamiraux@apple.com
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. >Whenever a FW_CGraphicContextGX is constructed, the facet's viewport is 
  9. >mapped and clipped, and a new transform is created, mapped and clipped. 
  10. >For optimum efficiency, it would be useful to instead create a child 
  11. >viewport with the correct mapping and clip, and maintain that state until 
  12. >a notification that there is a need to adjust the mapping and clip. Is 
  13. >there a simple way to accomplish this in ODF?
  14. >
  15. >Thanks for any ideas.
  16. >
  17. >Humayun Lari
  18. >
  19.  
  20. You can do that by overriding FW_CFame::FacetAdded, 
  21. FW_CFrame::FacetRemoved and FW_CFrame::GeometryChanged. Create your child 
  22. viewport in facetadded, destroy it in facetremoved and change what is 
  23. needed in Geometrychanged and maybe frameshapechanged (I am not sure). 
  24. You need to attach you child viewport to the facet by calling 
  25. FW_SetFacetRefcon and get it back by calling FW_GetFacetRefcon (defined 
  26. in FWFctInf.h in the graphic subsystem). Do not change the facet part 
  27. info directly because ODF is using it.
  28.  
  29. ........................................................................
  30.  Henri Lamiraux                                      lamiraux@apple.com
  31.  Apple Computer, Inc.                 OpenDoc(tm) Development Framework
  32. ........................................................................
  33.  
  34.